{% extends "base.html" %}

{% block content %}


<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center">
<table width='80%' class='grid' cellspacing='1' align='center'><tr><td colspan='3' class='title' align="center">Wellcome mail list <span style="padding-left:150px "><a href='/add_wm'>Add mail</a></span></td></tr>
<tr valign='middle' align='left'></tr>
  <tr valign='middle' align='left'>
  <td class='odd' width='10%' align='center'>ID</td>
  <td class='even' width='15%' align='center'>sales</td>
  <td class='odd' width='20%' align='center'>Program</td>
  <td class='even' width='5%' align='center'>Using</td>
<td class='odd' align='center'>Action</td>  

  </tr>
  {% for m in wm %}
 
  <tr valign='middle' align='left'>
  <td class='odd'>{{m.id}}</td>
   <td class='even'>{{m.sales.name}}</td>
   <td class='odd'>{{m.program.name}}</td>
   <td class='even'><input type="checkbox" name="autosendmail" value="1" {%if m.autosendmail%}checked{%endif%} disabled /></td>
<td class='odd' ><a href="/edit_wm/{{ m.id}}">Edit</a>&nbsp;&nbsp;&nbsp;<a href="/del_wm/{{ m.id}}" onclick="return confirm('Are you sure to delete it?');">Delete</a>&nbsp;&nbsp;&nbsp; <!-- <a href="/m_test/{{ m.id}}">Send a test mail</a> -->&nbsp;&nbsp;&nbsp;<a href="/m_demo/{{ m.id }}" target='blank'>mail demo</a></td>
  </tr>

  {% endfor %}


</table>


{% endblock %}